package ACC;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Wenjian2 {
    public static void main(String[] args) {
        FileInputStream f = null;
        int i = 0;
        try {
            f = new FileInputStream("D:\\java.txt");
            byte[] b = new byte[f.available()];
            while ((i = f.read(b)) != -1) {
                System.out.println(new String(b, 0, i));
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (f != null) {
                try {
                    f.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
